
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,member-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<!--[if lt IE 9]>
<script type="text/javascript" src="lib/html5.js"></script>
<script type="text/javascript" src="lib/respond.min.js"></script>
<script type="text/javascript" src="lib/PIE_IE678.js"></script>
<![endif]-->
<link href="css/H-ui.min.css" rel="stylesheet" type="text/css" />
<link href="css/H-ui.admin.css" rel="stylesheet" type="text/css" />
<link href="lib/Hui-iconfont/1.0.1/iconfont.css" rel="stylesheet"
	type="text/css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<title>优惠券使用情况</title>
</head>
<body>
	<nav class="breadcrumb">
        <i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>   <span class="c-gray en">&gt;</span> 优惠券使用情况
		<a class="btn btn-success btn-refresh radius r mr-20"
			style="line-height:1.6em;margin-top:3px" onclick="javascript:location.replace(location.href);"
			href="javascript:location.replace(location.href);" title="刷新">刷新</a>
  
	</nav>
	<div class="pd-20">
		<div class="mt-20"></div>
		<div class="cl pd-5 bg-1 bk-gray"> 
		<form action="<%=path%>/backstage/coupon_detail-list" method="get" class="form form-horizontal" id="search-form">
		<div class="text-c"> 		
			<div class="row cl">
				<label class="form-label col-1">分类:</label>
				<div class="formControls col-2">
					<span class="select-box"> 
					<select name="coupon_cate_id" 
						class="select">
							<option value="-1">--全部--</option>
							<option value="0"
								<c:if test="${coupon_cate_id==0}">selected</c:if>>美食</option>
							<option value="1"
								<c:if test="${coupon_cate_id==1}">selected</c:if>>购物</option>
					</select>
					</span>
				</div>
			
				<label class="form-label col-1">优惠金额:</label>
				<div class="formControls col-2">
					<span class="select-box"> <select name="coupon_amout"
						class="select">
							<option value="-1">--不限--</option>
							<c:forEach items="${u_coupon_amount}" var="coupon_list">					
								<option value="${coupon_list.COUPON_AMOUT}" <c:if test="${coupon_amout == coupon_list.COUPON_AMOUT}">selected</c:if>>						
									${coupon_list.COUPON_AMOUT}元
								</option>
							</c:forEach>

					</select>
					</span>
				</div>
				<label class="form-label col-1">使用时间</label>
					<div class="formControls col-2">
						<input type="text"  name="sdate" id="sdate" value="${sdate}" readonly="readonly"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="input-text Wdate" >						
					</div>
					<label class="form-label col-1">至</label>
					<div class="formControls col-2">
						<input type="text"  name="edate" id="edate" value="${edate}" readonly="readonly"  onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" class="input-text Wdate" >
					</div>
			
				<button name="" id="" class="btn btn-success"
					style="border-radius: 5px; float: right;" type="submit">
					搜索</button>
				<div style="width: 10px; height: 5px; float: right;"></div>		
			</div>
		</div>
		</form>
	</div>
	<div class="mt-20"></div>
	<div class="cl pd-5 bg-1 bk-gray"> 
		<div class="formControls col-2">	
			<div class="formControls cl-2">已使用：${usenum}张</div><div class="formControls cl-2">未使用：${surplusnum}张</div>
		</div>
	</div>
		<div class="mt-20">
			<table
				class="table table-border table-bordered table-hover table-bg table-sort">
				<thead>
					<tr class="text-c">
	                    <th width="80">用户名</th>
	                    <th width="80">使用时间</th>                        
	                    <th width="80">实用款</th>
					</tr>
				</thead>
				<tbody>
					<c:forEach items="${u_coupon_details}" var="u_coupon_detail">				
					<tr class="text-c">                   
						<td>${u_coupon_detail.C_NICK}</td>
						<td>${u_coupon_detail.USE_TIME}</td>
						<td>${u_coupon_detail.BALANCE_PRICE}</td>
					</tr>
					</c:forEach>
				</tbody>
			</table>
		</div>
	</div>
	<script type="text/javascript" src="lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="lib/layer/1.9.3/layer.js"></script>
	<script type="text/javascript" src="lib/laypage/1.2/laypage.js"></script>
	<script type="text/javascript" src="lib/My97DatePicker/WdatePicker.js"></script>
	<script type="text/javascript"
		src="lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
	<script type="text/javascript" src="js/H-ui.js"></script>
	<script type="text/javascript" src="js/H-ui.admin.js"></script>
	<script type="text/javascript">
		$(function() {
			$('.table-sort').dataTable({
				"aaSorting" : [ [ 0, "desc" ] ],//默认第几个排序
				"bStateSave" : true,//状态保存
				"aoColumnDefs" : [
				//{"bVisible": false, "aTargets": [ 3 ]} //控制列的隐藏显示
				{
					"orderable" : false,
					"aTargets" : [ 1, 2 ]
				} // 制定列不参与排序
				]
			});
			$('.table-sort tbody').on('click', 'tr', function() {
				if ($(this).hasClass('selected')) {
					$(this).removeClass('selected');
				} else {
					table.$('tr.selected').removeClass('selected');
					$(this).addClass('selected');
				}
			});
			
		});
		
		function get_amount_list(coupon_cate_id){		
			$.ajax({
				type : "POST",
				url : "<%=path%>/backstage/coupon_detail_amount-list",
				data : "coupon_cate_id=" + coupon_cate_id,
				error : function() {
					layer.msg('操作失败', {icon:5,time:1000});
				},
				success : function(msg) {
					alert(msg);
					
				}
			});
		}

	</script>
</body>
</html>



